home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 039a / uw201.zip / UW_PROTO.H < prev    next >
Text File  |  1991-10-07  |  10KB  |  234 lines

  1. /****************************************************************************/
  2. /* Prototype File                                Wed Aug 07 07:27:08 1991   */
  3. /****************************************************************************/
  4.  
  5. /*------------------------- Prototypes for UW_WIN.C ------------------------*/
  6. void reset_all_masks();
  7. void refresh_desktop();
  8. void refresh_column( int col );
  9. void refresh_row( int row );
  10. void refresh_rect( RECT r );
  11. void add_wn_mask( WINDOW *wnp );
  12. void remove_wn_mask( WINDOW *wnp );
  13. void col_wn_mask( int x_pos, int y_min, int y_max, int amount );
  14. void row_wn_mask( int y_pos, int x_min, int x_max, int amount );
  15. void set_window_attr();
  16. WINDOW *end_window( WINDOW *wnp );
  17. WINDOW *cr_inwindow( int col, int row );
  18. WINDOW *add_window( WINDOW *wnp );
  19. int remove_window( WINDOW *wnp );
  20. void pull_to_top( WINDOW *wnp );
  21. int make_top_window( WINDOW *wnp );
  22. void mask_flags_on();
  23. void move_wn_left( int cols, WINDOW *wnp );
  24. void move_wn_right( int cols, WINDOW *wnp );
  25. void move_wn_up( int rows, WINDOW *wnp );
  26. void move_wn_down( int rows, WINDOW *wnp );
  27. void set_rect(RECT *rectp, int x1, int y1, int x2, int y2);
  28. int rect_equal(RECT r1, RECT r2);
  29. rect_enclosed(RECT *r1, RECT *r2);
  30. int rect_overlap(RECT *r1, RECT *r2);
  31. void offset_rect(RECT *rectp, int col, int row);
  32. int cr_inrect(int col, int row, RECT rect);
  33.  
  34. /*------------------------- Prototypes for UW_FONT.C ------------------------*/
  35. int encode_color(int r, int g, int b);
  36. void decode_color(int color, int *r, int *g, int *b);
  37. void write_palette( int pnum, uchar val );
  38. void write_palette_all( uchar *vals );
  39. int read_palette( int pnum );
  40. void read_palette_all( uchar *vals );
  41. void set_block_ab(int a, int b);
  42. void blink_enable(int state);
  43. void replicate_enable(int state);
  44. int load_font( uchar *font, char *fname );
  45. int save_font( uchar *font, char *fname, int scan_lines );
  46. void install_font(uchar *font, int block, int offset, int cnt,
  47.     int scan_lines, int setmode );
  48. void rom8x8(int block, int setmode);
  49. void rom8x14(int block, int setmode);
  50. void rom8x16(int block, int setmode);
  51. uchar far *get_font_info( int type, int *scan_lines, int *rows );
  52.  
  53. /*------------------------- Prototypes for UW_ENTRY.C ------------------------*/
  54. int wn_gets( char *str, char *mask, char *template, int m_att,
  55.                     int strip_mode, WINDOW *wnp );
  56. int wn_gets_ll( char *str, char *mask, char *template, int m_att,
  57.                     int flags, int disp_width, WINDOW *wnp );
  58. int init_gets_str( char *s, char *m, char *t, char *wk );
  59. void disp_entry( int c, int r, int m_att, char *s, char *m, int offset,
  60.                                  int disp_width, int arrow_flag, WINDOW *wnp );
  61. void g_insert( char *s, char *m, char *t, int pos );
  62. void g_delete( char *s, char *m, char *t, int pos );
  63. void add_mask( char *s, char *m, char *t );
  64. void rmv_mask( char *s, char *t );
  65. int validate( char *c, char t );
  66. void strip_entry( char *s, char *m );
  67. void strip_end( char *s, char *m );
  68. int strip_len( char *s, char *m );
  69. int init_gets_str( char *s, char *m, char *t, char *wk );
  70. void up_first_char(char *s, char *m);
  71.  
  72. /*------------------------- Prototypes for UW_MENU.C ------------------------*/
  73. void menu_st( MENU *mnp, int csr, int inx);
  74. void item_add( char *entry, int id, int first_pos, MENU *mnp );
  75. void menu_set( MENU *mnp );
  76. void menu_restore( MENU *mnp );
  77. void menu_destroy( MENU *mnp );
  78. void decrement_csr( int *csr, int min, int max);
  79. void increment_csr( int *csr, int min, int max);
  80. int upkey( int key );
  81. int menu_horiz( MENU *mnp, int proc_mode );
  82. int menu_vert( MENU *mnp, int proc_mode );
  83. int do_menu( MENU *mnp, int proc_mode );
  84. int menu_system( MENU *top_mnp, MENU *dropmenu[], int draw_top );
  85.  
  86. /*------------------------- Prototypes for UW_PRTF.C ------------------------*/
  87. int wn_printf( WINDOW *wnp, char *fmt, ... );
  88.  
  89. /*------------------------- Prototypes for UW_RFSH.C ------------------------*/
  90. move_n_to_f( int *s, int dest_seg, int dest_off, int cnt );
  91. move_f_to_n( int src_seg, int src_off, int *d, int cnt );
  92. void wn_io( int dir, int area, WINDOW *wnp );
  93. void wn_rfsh_line( int line, WINDOW *wnp );
  94. void wn_rfsh_col( int col, WINDOW *wnp );
  95.  
  96. /*------------------------- Prototypes for UW_WN.C  ------------------------*/
  97. int wn_create( int x_min, int y_min, int x_max, int y_max, int bdr, int mode, WINDOW *wnp );
  98. void wn_destroy( WINDOW *wnp );
  99. void wn_set( WINDOW *wnp );
  100. void wn_clear( WINDOW *wnp );
  101. void wn_move( int col, int row, WINDOW *wnp );
  102.  
  103. /*------------------------- Prototypes for UW_LL.C  ------------------------*/
  104. int _csr_adj( WINDOW *wnp );
  105. void _scroll( int dir, WINDOW *wnp );
  106. uchar far *_calc_scr_addr(WINDOW *wnp);
  107. uchar *_calc_buff_addr(WINDOW *wnp);
  108. uchar *_calc_mask_addr(WINDOW *wnp);
  109. void _calc_all_addr(uchar far **scr, uchar **buff, uchar **mask, WINDOW *wnp);
  110.  
  111. /*------------------------- Prototypes for UW_BDR.C ------------------------*/
  112. void wn_co( int cnt, uchar c, WINDOW *wnp );
  113. void wn_border( WINDOW *wnp );
  114. void wn_hline(int row, int style, WINDOW *wnp);
  115. void wn_vline(int col, int style, WINDOW *wnp);
  116.  
  117. /*------------------------- Prototypes for UW_MASK.C ------------------------*/
  118. void adjust_mask_col( int x_pos, int y_min, int y_max, int amount, WINDOW *wnp );
  119. void adjust_mask_row( int y_pos, int x_min, int x_max, int amount, WINDOW *wnp );
  120. void set_mask( int mode, WINDOW *wnp1, WINDOW *wnp2 );
  121. void clear_mask( WINDOW *wnp );
  122.  
  123. /*------------------------- Prototypes for UW_TERM.C ------------------------*/
  124. void wn_claol( WINDOW *wnp );
  125. void wn_cleol( WINDOW *wnp );
  126. void wn_clbol( WINDOW *wnp );
  127. void wn_cleos( WINDOW *wnp );
  128. void wn_clbos( WINDOW *wnp );
  129. void wn_claos( WINDOW *wnp );
  130. void wn_cln(int qty, WINDOW *wnp);
  131. void wn_clear_tabs( WINDOW *wnp );
  132. void wn_init_tabs( int space, WINDOW *wnp );
  133. void wn_set_tab( WINDOW *wnp );
  134. void wn_reset_tab( WINDOW *wnp );
  135. void wn_tab_right( int cnt, WINDOW *wnp );
  136. void wn_tab_left( int cnt, WINDOW *wnp );
  137. void wn_ins_del_chars(int mode, int c, int cnt, WINDOW *wnp );
  138. void wn_ins_del_lines(int mode, int c, int cnt, WINDOW *wnp );
  139. void wn_csr_dn( int qty, WINDOW *wnp );
  140. void wn_csr_up( int qty, WINDOW *wnp );
  141. void wn_csr_left( int qty, WINDOW *wnp );
  142. void wn_csr_right( int qty, WINDOW *wnp );
  143. void wn_csr_pos( int line, int col, WINDOW *wnp );
  144. void wn_scroll_reg( int line_s, int line_e, WINDOW *wnp );
  145. void wn_bksp( int qty, WINDOW *wnp );
  146.  
  147. /*------------------------- Prototypes for UW_GRAPH.C ------------------------*/
  148. int init_uw_graphics( int xres, int yres, int font_rows, int font_spacing, int seg, int off );
  149. int g_ch( int c, int r, int v );
  150. void compatibility_hook();
  151.  
  152. /*------------------------- Prototypes for UW_ST.C  ------------------------*/
  153. void wn_st( char *s, WINDOW *wnp );
  154. void wn_st_qty( char *s, int qty, WINDOW *wnp );
  155. void wn_plst( int col, int line, char *s, WINDOW *wnp );
  156.  
  157. /*------------------------- Prototypes for UW_CSR.C ------------------------*/
  158. void rd_csr( int *col, int *line );
  159. void mv_csr( int col, int line );
  160. void csr_style( int style );
  161. void csr_hide();
  162. void csr_show();
  163. void pl_csr( WINDOW *wnp );
  164.  
  165. /*------------------------- Prototypes for UW_CH.C  ------------------------*/
  166. void wn_ch( int c, WINDOW *wnp );
  167. void wn_noatt_ch( int c, WINDOW *wnp );
  168. uchar wn_och( WINDOW *wnp );
  169. uchar wn_oatt( WINDOW *wnp );
  170. void wn_qch( int cnt, uchar c, WINDOW *wnp );
  171.  
  172. /*------------------------- Prototypes for UW_PRINT.C ------------------------*/
  173. int init_printer( char *fname, char *diskbuff, long isize, long msize, PRINT *p );
  174. int end_printer( PRINT *p );
  175. int realloc_printer( long new_size, PRINT *p );
  176. void set_prt_xlat( int state, uchar *xlat, PRINT *p );
  177. int print_char( uchar c, PRINT *p );
  178. int print_str( uchar *str, PRINT *p );
  179. int print_data( uchar *data, int cnt, PRINT *p );
  180. int print_file( char *fname, PRINT *p );
  181. int print_window( WINDOW *wnp, PRINT *p );
  182. int print_screen( PRINT *p );
  183. int print_eol( PRINT *p );
  184. int print_in_bkgrnd( void );
  185. void disp_print_stats( PRINT *p, int mode, WINDOW *wnp );
  186.  
  187. /*------------------------- Prototypes for UW_EVENT.C ------------------------*/
  188. void m_reset(M_RESET *m);
  189. void m_colrange( int col_min, int col_max );
  190. void m_rowrange( int row_min, int row_max );
  191. void init_mouse();
  192. void end_mouse();
  193. void m_show();
  194. void m_hide();
  195. void m_pos( M_LOC *m );
  196. void m_moveto( int col, int row );
  197. void m_pressed( int button, M_LOC *m );
  198. void m_released( int button, M_LOC *m );
  199. void m_textcursor(int curstype, unsigned arg1, unsigned arg2);
  200. void m_motion( M_MOVE *m );
  201. void m_lpen_on();
  202. void m_lpen_off();
  203. void m_ratio( int horiz, int vert );
  204. void wait_ticks( clock_t ticks );
  205. int get_key();
  206. int check_key();
  207. int event_pending();
  208. void set_idle_func( int (*func_ptr)() );
  209. void wait_event();
  210.  
  211. /*------------------------- Prototypes for UW_VID.C ------------------------*/
  212. void set_25_rows();
  213. int get_num_rows();
  214. void get_v_mode();
  215. void init_video(int cols, int rows);
  216. void set_vid_addr( int segment, int offset );
  217. void force_video(int force_mode, int cols, int rows);
  218. void end_video();
  219. uchar swap_nibbles( uchar c );
  220. uchar get_att( uchar att );
  221. void check_desq();
  222. void mode43();
  223. void mode25();
  224. ega_vga_check();
  225. void far interrupt clock_vect();
  226. void init_clock(unsigned int speed);
  227. void end_clock();
  228. void clock_speed( uint speed );
  229. void tone( uint freq, int dur );
  230. void sound_off();
  231. void wait_ticks( clock_t ticks );
  232.  
  233. /**** END OF FILE ****/
  234.